bitkeeper revision 1.1389.1.13 (42722e78tJ9dMvMOlJBiS68RNPTvfw)
authorkraxel@bytesex.org[kaf24] <kraxel@bytesex.org[kaf24]>
Fri, 29 Apr 2005 12:54:16 +0000 (12:54 +0000)
committerkraxel@bytesex.org[kaf24] <kraxel@bytesex.org[kaf24]>
Fri, 29 Apr 2005 12:54:16 +0000 (12:54 +0000)
commitf81967e2f7ac2205c468daec264ae535d64eb42d
treea8e198136c533a1759d99207dcd30366c8c46f9a
parentfecce245c71b13c6e8724732393967a8d37e76fe
bitkeeper revision 1.1389.1.13 (42722e78tJ9dMvMOlJBiS68RNPTvfw)

[PATCH] [patch] pgtable.c cleanups

  Hi guys,

The new mm_(un)pin stuff is certainly a nice optimization.

But can we take care a bit more about coding style issues
and write code not *that* hackish please?  Casts, code
duplication, "unsigned long" for page table entries *again*.
And a few more variables also make the code more readable
(and gcc should be clever enougth that this isn't a
performance hit).  We want to have that merged some day in
mainline, don't we?

The patch below cleans up the pin/unpin code in pgtable.c
I've created two helper functions to factor out common code,
the page table walk is basically the same for both pin and
unpin, it's just different page flags.  Also fixed up the
walk code to correcly walk through all 4 levels linux has,
so it works correctly for the PAE case.  For x86_64 it
should work fine as well (untested though).

please apply,

  Gerd
BitKeeper/etc/logging_ok
linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c